<?php
/*
 * Created on 30-04-2011 by michalwski
 */
 class Survey extends AppModel {
	var $validate = array();

	function beforeValidate(){
		$emails = ClassRegistry::init('Email');
		$this->validate = array(
			'email' => array(
				'rule' => array('inList', $emails->find('list', array('fields' => array('id', 'email')))),
				'message' => 'Podaj maila na którego dostałeś(aś) link z ankietą',
			)
		);
	}
 }
?>
